<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基于RFID的幼儿园无源手环 - 首页</title>
    <link rel="stylesheet" href="style.css">
    <style>
        /* 首页样式 */
        .hero {
            width: 100%;
            height: 100vh; /* 占满屏幕高度 */
            background: url("./images/index.png") center center no-repeat; 
            background-size: cover; /* 图片铺满 */
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
            margin-top: 60px; /* 避开固定导航栏 */
        }

        .hero-title {
            font-size: 42px;
            color: #FFFFFF;
            font-weight: bold;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
            margin-bottom: 20px;
        }

        .hero-desc {
            font-size: 18px;
            color: #FFFFFF;
            text-shadow: 0 1px 5px rgba(0,0,0,0.3);
            max-width: 800px;
            margin: 0 auto 30px;
        }

        /* 企业介绍 section */
        .about-section {
            padding: 80px 0;
        }

        .section-title {
            font-size: 28px;
            color: #333333;
            text-align: center;
            margin-bottom: 40px;
            position: relative;
        }

        .section-title::after {
            content: "";
            display: block;
            width: 60px;
            height: 3px;
            background-color: #4CAF50;
            margin: 15px auto 0;
        }

        .about-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            max-width: 900px;
            margin: 0 auto;
        }

        .about-content p {
            font-size: 16px;
            margin-bottom: 20px;
            color: #666666;
        }

        /* 产品介绍 section（图文结合） */
        .product-section {
            padding: 80px 0;
            background-color: #FFFFFF; 
        }

        .product-content {
            display: flex;
            align-items: center;
            gap: 50px; /* 图文间距 */
        }

        .product-img {
            width: 50%;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }

        .product-text {
            width: 50%;
        }

        .product-text h3 {
            font-size: 22px;
            color: #333333;
            margin-bottom: 15px;
        }

        .product-text p {
            font-size: 16px;
            color: #666666;
            margin-bottom: 15px;
        }

        .product-features {
            list-style: none;
            margin: 20px 0;
        }

        .product-features li {
            margin-bottom: 10px;
            display: flex;
            align-items: center;
        }

        .product-features li::before {
            content: "✓";
            color: #4CAF50;
            font-weight: bold;
            margin-right: 10px;
        }

        /* 最新新闻 section */
        .news-section {
            padding: 80px 0;
            background-color: #F9FBF8;
        }

        .news-preview {
            display: flex;
            gap: 20px;
            margin-top: 30px;
        }

        .news-preview-item {
            width: 33%;
            background-color: #FFFFFF;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: transform 0.3s;
        }

        .news-preview-item:hover {
            transform: translateY(-3px);
        }

        .news-preview-title {
            font-size: 18px;
            margin-bottom: 10px;
        }

        .news-preview-title a {
            text-decoration: none;
            color: #333333;
            transition: color 0.3s;
        }

        .news-preview-title a:hover {
            color: #4CAF50;
        }

        .news-preview-date {
            font-size: 14px;
            color: #999999;
            margin-bottom: 15px;
        }

        .news-preview-excerpt {
            font-size: 14px;
            color: #666666;
            margin-bottom: 15px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-preview-more {
            color: #4CAF50;
            text-decoration: none;
            font-size: 14px;
        }

        .news-preview-more:hover {
            text-decoration: underline;
        }

        /* 响应式适配（小屏幕） */
        @media (max-width: 768px) {
            .nav {
                width: 100%;
                padding: 0 20px;
            }
            .container {
                width: 100%;
            }
            .hero-title {
                font-size: 32px;
            }
            .product-content {
                flex-direction: column;
            }
            .product-img, .product-text {
                width: 100%;
            }
            .news-preview {
                flex-direction: column;
            }
            .news-preview-item {
                width: 100%;
                margin-bottom: 20px;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
        <div class="nav-container">
            <nav class="nav">
                <div class="logo">RFID无源手环</div>
                
                <!-- 汉堡菜单按钮 -->
                <div class="hamburger" id="hamburger">
                    <span></span>
                    <span></span>
                    <span></span>
                </div>
                
                <!-- 导航菜单 -->
                <ul class="nav-menu" id="navMenu">
                    <li><a href="index.html">首页</a></li>
                    <li><a href="product.html">产品介绍</a></li>
                    <li><a href="news.html">最新新闻</a></li>
                    <li><a href="about.html">关于我们</a></li>
                    <li><a href="contact.html">联系我们</a></li>
                </ul>
            </nav>
        </div>

    <!-- 满屏封面图区域 -->
    <div class="hero">
        <div class="hero-content">
            <h1 class="hero-title">欢迎来到基于RFID的幼儿园无源手环健康宣传平台</h1>
            <p class="hero-desc">无感穿戴 · 无源安全 · 防潮防碰撞 · 助力幼儿园智慧管理与家校共育</p>
            <a href="product.html" class="btn">了解产品</a>
        </div>
    </div>

    <!-- 企业介绍区域 -->
    <section class="about-section">
        <div class="container">
            <h2 class="section-title">关于我们</h2>
            <div class="about-content">
                <p>我们聚焦幼儿园健康监测场景，针对传统有源手环"充电麻烦、安全隐患"等痛点，研发基于RFID技术的无源手环，打造"设备+平台"一体化解决方案。</p>
                <p>项目以"实用主义、以人为本、科技创新"为理念，核心团队来自珠海科技学院，依托校园技术资源与市场调研，确保产品贴合幼儿园教师、家长与幼儿的真实需求，助力教育场景智能化升级。</p>
                <a href="about.html" class="btn">查看更多</a>
            </div>
        </div>
    </section>

    <!-- 产品介绍区域（图文结合） -->
    <section class="product-section">
        <div class="container">
            <h2 class="section-title">核心产品：幼儿园无源RFID手环</h2>
            <div class="product-content">
                <img src="./images/product-img.jpg" alt="RFID无源手环实物图" class="product-img"> 
                <div class="product-text">
                    <h3>专为3-6岁幼儿设计，安全与实用兼顾</h3>
                    <p>基于RFID无源技术，无需充电，从根源避免充电发热、电池漏液等安全隐患，让家长与老师更放心。</p>
                    <ul class="product-features">
                        <li> <strong>无感穿戴</strong>：尺寸43.45×24.54×8.99mm，轻质材料，不影响幼儿日常活动</li>
                        <li> <strong>防潮防碰撞</strong>：封闭型外壳，应对雨天、洗手溅水等场景，芯片不易损坏</li>
                        <li> <strong>数据安全</strong>：AES高级加密传输，幼儿身份、健康数据不泄露</li>
                        <li> <strong>智慧联动</strong>：对接幼儿园现有系统，支持教师管理、家长实时查询</li>
                    </ul>
                    <a href="product.html" class="btn">查看详细参数</a>
                </div>
            </div>
        </div>
    </section>

    <!-- 最新新闻区域 -->
    <section class="news-section">
        <div class="container">
            <h2 class="section-title">最新动态</h2>
            <div class="news-preview" id="newsPreview">
                <!-- 最新新闻将通过JavaScript动态生成 -->
            </div>
            <div style="text-align: center; margin-top: 30px;">
                <a href="news.html" class="btn">查看更多新闻</a>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="footer-content">
            <p>项目名称：基于RFID的幼儿园健康监测物联网平台</p>
            <p>联系电话：xxxxxxxxxxxx | 邮箱：xxxxxxxxxxxxx</p>
            <p>地址：珠海市珠海科技学院 | 邮编：519000</p>
            <p>© 2024 版权所有 | 环保简约 · 科技守护幼儿健康</p>
        </div>
    </footer>

    <!-- 引入新闻数据 -->
    <script src="news-data.js"></script>
    
    <!-- 首页新闻预览功能脚本 -->
    <script>
        // 在首页显示最新新闻
        function renderNewsPreview() {
            const newsPreview = document.getElementById('newsPreview');
            
            // 获取最新的3条新闻
            const latestNews = [...allNews]
                .sort((a, b) => new Date(b.date) - new Date(a.date))
                .slice(0, 3);
            
            let html = '';
            
            latestNews.forEach(news => {
                html += `
                <div class="news-preview-item">
                    <h3 class="news-preview-title">
                        <a href="news-detail.html?id=${news.id}">${news.title}</a>
                    </h3>
                    <div class="news-preview-date">${news.date}</div>
                    <p class="news-preview-excerpt">${news.excerpt}</p>
                    <a href="news-detail.html?id=${news.id}" class="news-preview-more">阅读全文 →</a>
                </div>
                `;
            });
            
            newsPreview.innerHTML = html;
        }
        
        // 初始化首页新闻预览
        document.addEventListener('DOMContentLoaded', renderNewsPreview);
    </script>
	<script>
	        // 汉堡菜单交互功能
	        document.addEventListener('DOMContentLoaded', function() {
	            const hamburger = document.getElementById('hamburger');
	            const navMenu = document.getElementById('navMenu');
	            
	            // 点击汉堡菜单切换导航显示
	            hamburger.addEventListener('click', function() {
	                hamburger.classList.toggle('active');
	                navMenu.classList.toggle('active');
	            });
	            
	            // 点击导航链接后关闭移动端菜单
	            const navLinks = document.querySelectorAll('.nav-menu a');
	            navLinks.forEach(link => {
	                link.addEventListener('click', function() {
	                    if (window.innerWidth <= 768) {
	                        hamburger.classList.remove('active');
	                        navMenu.classList.remove('active');
	                    }
	                });
	            });
	            
	            // 窗口大小变化时重置菜单状态
	            window.addEventListener('resize', function() {
	                if (window.innerWidth > 768) {
	                    hamburger.classList.remove('active');
	                    navMenu.classList.remove('active');
	                }
	            });
	        });
	    </script>
</body>
</html>